码云 Gitee — 基于 Git 的代码托管和研发协作平台码云 Gitee — 基于 Git 的代码托管和研发协作平台 我的码云 
 4  
   龙行天下 / hzHTML
  
hz
 24 次提交
 3 个分支
 0 个标签
 0 个发行版
 2 位贡献者
   
hz/ src / views / userIndex / myDelist.vue
myDelist.vue
8.68 KB
 
Jay 提交于 2分钟前 . Jay
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<template>
    <div>
        <!--右边-->
        <div class="h-27">
            <div class="h-28">
                <ul class="h-29">
                    <li  @click="changerStatus(-1)" :class="{'active':cateStatus==-1}"><a href="javascript:;">
                        <div class="h-30"><img class="h1-30" src="@/assets/image/gp.png"/><img class="h2-30" src="@/assets/image/gp_on.png"/></div>

                        <div class="h-31">全部摘牌(<span>{{whole}}</span>)</div>

                       

                    </a></li>
                    <li @click="changerStatus(1)" :class="{'active':cateStatus==1}"><a href="javascript:;">
                        <div class="h-30"><img class="h1-30" src="@/assets/image/sh.png"/><img class="h2-30" src="@/assets/image/sh_on.png"/></div>
                        <div class="h-31">待审核(<span>{{wait}}</span>)</div>
                    </a></li>
                    <li @click="changerStatus(2)" :class="{'active':cateStatus==2}"><a href="javascript:;">
                        <div class="h-30"><img class="h1-30" src="@/assets/image/gp.png"/><img class="h2-30" src="@/assets/image/gp_on.png"/></div>
                        <div class="h-31">待签订(<span>{{delistSuccess}}</span>)</div>
                    </a></li>
                    <li @click="changerStatus(3)" :class="{'active':cateStatus==3}"><a href="javascript:;">
                        <div class="h-30"><img class="h1-30" src="@/assets/image/qd.png"/><img class="h2-30" src="@/assets/image/qd.png"/></div>
                        <div class="h-31">交货中(<span>{{unSigned}}</span>)</div>
                    </a></li>
                    <li @click="changerStatus(4)" :class="{'active':cateStatus==4}"><a href="javascript:;">
                        <div class="h-30"><img class="h1-30" src="@/assets/image/cj.png"/><img class="h2-30" src="@/assets/image/cj_on.png"/></div>
                        <div class="h-31">摘牌成功(<span>{{delivery}}</span>)</div>
                    </a></li>
                </ul>
            </div>
            <div class="h-32">
                <div class="h-33">全部摘牌(<span>{{total}}</span>)</div>
                <ul class="h-34 j-2" >
                    <li v-for="(v,index) in delistList" :key="index"><a href="javascript:;">
                        <div class="h-38">
                            <div class="h-35" v-if="v.productObj"><span class="h-36">{{v.productObj.product_name}}</span><span class="h-37"><img src="@/assets/image/fa-eye.png"/><span>234567</span></span></div>
                            <div class="h-39" v-if="v.productObj">要求:{{v.productObj.delist_text}}</div>
                            <div class="h-40">
                                <div class="h-41" v-if="v.productObj">
                                    <div class="h-42">挂牌类型</div>
                                    <div class="h-43">{{v.productObj.trading_type==0?"作品挂牌":"项目挂牌"}}</div>
                                </div>
                                <div class="h-41" v-if="v.productObj">
                                    <div class="h-42">许可</div>
                                    <div class="h-43">{{v.productObj.permission_type==0?"专有许可":"非专有许可"}}</div>
                                </div>
                                <div class="h-41" v-if="v.productObj">
                                    <div class="h-42">出让专利</div>
                                    <div class="h-43">{{v.productObj.empower_type==0?"部分":"全部"}}</div>
                                </div>
                                <div class="h-41" v-if="v.productObj">
                                    <div class="h-42">作品类型</div>
                                    <div class="h-43">{{v.productObj.type==0?"作品":"项目"}}</div>
                                </div>
                                <div class="h-41" >
                                    <div class="h-42">授权期限</div>
                                    <div class="h-43">{{v.delistEndTime}}</div>
                                </div>
                            </div>
                        </div>
                        <object class="h-44">
                            <!-- <a href="javascript:;" class="h-45">申请摘牌</a>
                            <div class="j-1">
                                <a href="javascript:;" class="h-47">编辑</a>
                                <i></i>
                            </div> -->
                            <div class="j-1">
                                 <a href="javascript:;" class="h-46" @click="acuths(item)" v-if="v.state==1 || v.state==3">提交审核</a>
                                  <a href="javascript:;" class="h-46" @click="signProject(item)" v-if="v.state==5 || v.state==52">签订</a>
                                  <a href="javascript:;" class="h-46"  v-if="v.state==51" >签订中</a>
                                  <a href="javascript:;" class="h-46"  v-if="v.state==6" @click="pay(item)">去支付</a>
                                  <a href="javascript:;" class="h-46"  v-if="v.state==7 || v.state==8" >交货中</a>
                                  <a href="javascript:;" class="h-46"  v-if="v.state==9 ">摘牌成功</a>
								  <a href="javascript:;" class="h-47" v-if="v.status<5" @click="editDelist(v)">编辑</a>
										<i></i>
							</div>
                        </object>
                        <div class="a-28">
                            <span v-if="v.status==1">被驳回</span>
                                    <span v-if="v.status==2">待审核</span>
                                    <span v-if="v.status==3">初审通过</span>
                                    <span v-if="v.status==4">终审通过</span>
                                    <span v-if="v.status==5">价格磋商完成</span>
                                    <span v-if="v.status==6">协议签订并付款完成</span>
                                    <span v-if="v.status==7">挂牌方确认收款</span>
                                    <span v-if="v.status==8">摘牌成功</span>
                            </div>
                    </a></li>
                   
                </ul>
                <div class="a-35 h-48">

  <el-pagination
                             @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-sizes="[10, 50, 100, 200]"
      :page-size="pageSize"
    layout=" pager"
    :total="total">
  </el-pagination>


                  
                </div>
            </div>
        </div>
        <div style="clear: both;"></div>
    </div>
</template>

<script>
  import {list,statusCount,getDelistingContract,submitApprove} from '@/api/myDelist';
    import {setToken} from '@/utils/auth'
    var _self;
    export default {
        name: "myDelist",
        data(){
            return{
            cateStatus:-1,//默认的查询类别
            currentPage:1,//当前页
            pageSize:10,//一页面显示多少条
            total:0,//总数
            delistList:[
                {productObj:{product_name:""}}
            ],
            whole:0,
            wait:0,
            unSigned:0,
            delivery:0,
            delistSuccess:0
           }
        },
         created:function(){
          _self = this;
         _self.init();
      },
      methods:{
          init:function(){
           let data = {"status":_self.cateStatus,"currentPage":_self.currentPage,"size":_self.pageSize}
           list(data).then(res=>{
           
              console.log(res);
             if(res.code==200){
                 _self.total = res.data.totalResult;
                 _self.delistList=res.data.delistList;
             }else{
                 console.log(res.msg);
             }
              
           })
           statusCount().then(res=>{
                _self.whole = res.data.whole;
                _self.wait = res.data.wait;
                _self.unSigned = res.data.unSigned;
                _self.delivery = res.data.delivery;
                _self.delistSuccess = res.data.delistSuccess;
           })
         
      
       },
       acuths(item){
           let data = {"delistId":item.delistId}
           submitApprove(data).then((res)=>{
               if(res.code==200){
                   _self.$messgae({
                       type:"success",
                       messgae:res.msg
                   })
                   _self.init();
               }
           })
     submitApprove()
       },
       signProject(item){
    let data = {"productId":item.product_id}
           getDelistingContract(data).then((res)=>{
             if(res.code==200){
               _self.init();
             }
           })
},
       handleSizeChange:function(e){
           
            _self.pageSize = e;
            _self.init();
        },
        handleCurrentChange:function(e){
           
            _self.currentPage=e;
            _self.init();
        },
        changerStatus:function(data){
            console.log(data);
            _self.cateStatus=data;
            _self.init();
        },
        editDelist:function(data){
            //_self.$router.push('/userIndex/delistApply')
            _self.$router.push({
                name:'editApply',
                 query:{
                   product:data.delistId
              }
            })
        },
        pay(item){
          _self.$router.push({
                name:'pay',
                 query:{
                   contractId:item.contractId
              }
            })
        },
      }
    }
</script>

<style >
    @import "../../css/index.css";
    @import "../../css/user_listing.css";
    @import "../../css/idangerous.swiper.css";
.el-pager li{
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 100%;
    border: 1px solid #d1d1d1;
    color: #cdcdcd;
    font-size: 16px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    vertical-align: top;
    margin-right: 20px;
    }
    .el-pager li.active{
       
    color: #ffa426;
    border-color: #ffa426;

    }
    .el-pager li:hover{
        color: #ffa426;
    }
    .el-pagination .btn-next,.el-pagination .btn-prev{
        padding-top: 14px;
    }
</style>
